# spin_cow.py ~ spin a cow with a callback and a transform
import pyscene, osg, math
scene = pyscene.pyscene()

cow = scene.readNodeFile("cow.osg")
mt = osg.MatrixTransform()
mt.addChild(cow)
def spin_callback(self, nv, node) :
    self.postMult( osg.Matrixd.rotate(
        math.radians(0.1), 0, 0, 1
    ) )
mt.addUpdateCallback(spin_callback)

scene.addChild(mt)
scene.run()
